﻿using System;
using System.Diagnostics;

namespace HotspotHandler
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args[0] == "stop")
            {
                Process.Start("netsh.exe", "wlan stop hostednetwork").WaitForExit();
            }
            else
            {
                Process.Start("netsh.exe", "wlan set hostednetwork ssid=\"" + args[0] + "\" key=\"" + args[1] + "\" mode=allow").WaitForExit();
                Process.Start("netsh.exe", "wlan start hostednetwork").WaitForExit();
            }
        }
    }
}
